package utils.output.html;

import java.util.ArrayList;
//import java.util.HashMap;

import parser.Entry;
import parser.date_parser;

public class Paragraph {

	protected String classname = "";
	public Paragraph(){
		
	}
	
	public String get_paragraph_for_entry(ArrayList<Entry> entries){
		String result = "<p>"+System.lineSeparator();
		for(Entry entry : entries){
			result+= date_parser.get_time_formated(entry.getTime())+" ";
			if(entry.getUser().contains("@")){
				result+=entry.getUser().substring(1)+" ";
			}else {
				result+=entry.getUser()+" ";
			}
			if(entry.getTarget().contains("@")){
				result+=entry.getTarget().substring(1)+" ";
			}else {
				result+=entry.getTarget()+" ";
			}
			if(entry.getMyskill().getSkillname()!=null){
				result += entry.getMyskill().getSkillname()+" ";
			}
			if(entry.getMyskill().getSkillevent()!=null){
				result += entry.getMyskill().getSkillevent()+" : ";
			}
			if(entry.getMyskill().getSkillevent_action()!=null){
				result += entry.getMyskill().getSkillevent_action()+" ";
			}
			if(entry.getMyskill().getNumeric_value()!=null){
				result += entry.getMyskill().getNumeric_value()+" ";
			}
			if(entry.getMyskill().getType_damage()!=null){
				result += entry.getMyskill().getType_damage()+" ";
			}
			if(entry.getMyskill().getSecond_value()!=null) {
				result += entry.getMyskill().getSecond_value();
			}
			result += "<br />"+System.lineSeparator();
		}
		result +="</p>"+System.lineSeparator();
		
		
		
		return result;
	}
}
